package longrise.phone.com.bjjt_jyb.Adapter;

import android.content.Context;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.longrise.LEAP.Base.Objects.EntityBean;

import java.util.List;

import longrise.phone.com.bjjt_jyb.R;

public class MyCarAdapter extends BaseQuickAdapter {

    private List<EntityBean> lists;

    public MyCarAdapter(Context context, List<EntityBean> lists) {
        super(R.layout.adapter_mycar_item, lists);
        this.mContext = context;
        this.lists = lists;
    }

    @Override
    protected void convert(BaseViewHolder baseViewHolder, Object o) {
        //设置数据
        EntityBean bean = (EntityBean) o;
        baseViewHolder.setText(R.id.mycar_item_name,baseViewHolder.getLayoutPosition() + 1 + "、");
        baseViewHolder.setText(R.id.mycar_item_identityno, bean.getString("carno"));
        baseViewHolder.setText(R.id.mycar_item_fileno, "电话：" + bean.getString("carownerphone"));
    }

}
